package com.dries.portal.module.chat.utils;

import com.dries.portal.module.chat.entity.Chat;
import lombok.extern.slf4j.Slf4j;

import java.util.LinkedHashSet;
import java.util.Set;

/**
 * @Description:
 * @Author ZSY
 * @createTime 2020/8/25 9:49
 */
@Slf4j
public class CacheMsgUtil {

    private static final Set<Chat> manager = new LinkedHashSet<>();


    public static void put(Chat chat) {
        // TODO 验证用户是否登录 （redis）
        manager.add(chat);
    }

    private static Set<Chat> get(){
        return manager;
    }

    public static void clearCacheMap() {
        manager.clear();
    }

}
